
		chrome.extension.onMessage.addListener(onRequest);
	
		function onRequest(request, sender, response) {
			var comm = request.command;
			
			if (comm == 'translate') 
				translate(request.text, null, config.getDefaultLang(), function(res){
					response([res, renderTranslation(res)]);
				});
			else 
				if (comm = 'getHotkey') {
					var res = {
						keycode: config.hotkeyCode(),
						isCtrlShift: !config.isCtrlHotkey()
					};
					
					if (!res.keycode)					
						response();
					else
						response(res);
				}
		}
		
		
	